

#ifndef	__SPI_H
#define	__SPI_H




sbit SPI_MOSI = P1^3; 
//sbit SPI_MISO = P2^4;
sbit SPI_CLK  = P1^5; 


#define	SSIG		1
#define	SPEN		1
#define	DORD		0
#define	MSTR		1
#define	CPOL		1
#define	CPHA		1
#define	SPEED_4		0
#define	SPR1		0
#define	SPR0		0

#define	SPIF		0x80
#define	WCOL		0x40



void SPI_Init(void);
void SendByte(u8 byte);
u8 ReceiveByte(void);
void CheckBusy(void);



#endif
